﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace MySSO.Core.Repository
{
    public class ConfigConnectionString
    {
        public static string AcadsocConnectionString { get; set; }
        public static string AcadsocVisitConnectionString { get; set; }
        public static string AcadsocAdminConnectionString { get; set; }

        public static void Initialize()
        {
            //AcadsocConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString, "20160501");
            //AcadsocVisitConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection.AdminVistit"].ConnectionString, "20170525");
            //AcadsocAdminConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection.Admin"].ConnectionString, "20171017");

            AcadsocConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString, "20150801");
            AcadsocVisitConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection.AdminVistit"].ConnectionString, "20170525");
            AcadsocAdminConnectionString = DecryptString.DESDecrypt(ConfigurationManager.ConnectionStrings["SqlConnection.Admin"].ConnectionString, "20150801");
        }
    }
}
